<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>

<div class="row">
    <div class="span4">
        <legend>Conference</legend>
        <table class="table">
            <tr>
                <td>Title</td>
                <td><s:property value="conference.title" /></td>
            </tr>
            <tr>
                <td>Description</td>
                <td><s:property value="conference.description" /></td>
            </tr>
            <tr>
                <td>Start Submission</td>
                <td><s:property value="conference.startSubmission" /></td>
            </tr>
            <tr>
                <td>End Submission</td>
                <td><s:property value="conference.endSubmission" /></td>
            </tr>
            <tr>
                <td>Start Review</td>
                <td><s:property value="conference.startReview" /></td>
            </tr>
            <tr>
                <td>End Review</td>
                <td><s:property value="conference.endReview" /></td>
            </tr>
            <tr>
                <td>Start Registration</td>
                <td><s:property value="conference.startRegistration" /></td>
            </tr>
            <tr>
                <td>End Registration</td>
                <td><s:property value="conference.endRegistration" /></td>
            </tr>
            <tr>
                <td>Start Date</td>
                <td><s:property value="conference.startDate" /></td>
            </tr>
            <tr>
                <td>End Date</td>
                <td><s:property value="conference.endDate" /></td>
            </tr>
            <tr>
                <td>Location</td>
                <td><s:property value="conference.location.name" /></td>
            </tr>
        </table>    
    </div>    
    <div class="span4">
        <legend>Topics</legend>
        <!-- TODO loop thru topics -->
        <table class="table">
            <tr>
                <th>Title</th>
                <th>Description</th>
            </tr>
            <s:iterator value="conference.topics" var="topic">
                <tr>
                    <td><s:property value="#topic.title" /></td>
                    <td><s:property value="#topic.description" /></td>
                </tr>
            </s:iterator>
        </table>
        <!-- end topics loop -->    
        <s:form cssClass="form-horizontal" action="Conference/addTopic" method="POST">
            <s:hidden name="id" value="conference.id"></s:hidden>
            <div class="control-group">
                <label class="control-label" for="tiles_topic_title">Topic Title</label>
                <div class="controls">
                    <s:textfield name="topic.title" />      
                </div>
            </div>   
            <div class="control-group">
                <label class="control-label" for="tiles_topic_description">Topic Description</label>
                <div class="controls">
                    <s:textarea name="topic.description" />      
                </div>
            </div>     
            <button type="submit" class="btn pull-right">Create Topic</button>   
        </s:form>
    </div>    
    <!-- Events --> 

    <div class="span4"> 
        <legend>Events</legend>
        <!-- TODO loop thru events -->
        <table class="table">
            <tr>
                <th>Title</th>
                <th>Start time</th>
                <th>End time</th>
            </tr>
            <tr>
                <td><s:property value="event.title" /></td>
                <td><s:property value="event.startTime" /></td>
                <td><s:property value="event.endTime" /></td>
            </tr>
            <tr>
                <td colspan="3">
                    Location: <s:property value="event.eventLocation" /><br/>
                    <s:property value="event.description" /></td>
            </tr>
        </table>
        <!-- end topics loop -->   
        <s:form cssClass="form-horizontal" action="Conference/addEvent" method="POST">

            <div class="control-group">
                <label class="control-label" for="tiles_event_title">Event Title</label>
                <div class="controls">
                    <s:textfield name="event.title" />      
                </div>
            </div>   
            <div class="control-group">
                <label class="control-label" for="tiles_event_description">Event Description</label>
                <div class="controls">
                    <s:textarea name="event.description" />      
                </div>
            </div>   
            <div class="control-group">
                <label class="control-label" for="tiles_event_startTime">Event Start Time</label>
                <div class="controls">
                    <s:textfield name="event.startTime" cssClass="datepicker" />      
                </div>
            </div>  
            <div class="control-group">
                <label class="control-label" for="tiles_event_endTime">Event End Time</label>
                <div class="controls">
                    <s:textfield name="event.endTime" cssClass="datepicker" />      
                </div>
            </div>  
            <div class="control-group">
                <label class="control-label" for="tiles_event_location">Event Location</label>
                <div class="controls">
                    <s:textarea name="event.location" />      
                </div>
            </div>  
            <button type="submit" class="btn pull-right">Create Event</button> 

        </s:form>
    </div>

</div>      
<a href='<s:url action="Conference" />'>Back to index</a> 